package com.sisgh.jefdv1.core.entity;

import com.sisgh.jefdv1.core.entity.field.Field;
import lombok.Data;

import java.util.List;

/**
 * Java 实体
 */
@Data
public class Entity {
    // class name
    private String name;

    // fields
    private List<Field> fields;

    Entity() {}

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("Entity [name=").append(name).append("]").append("\n");
        for (Field field : fields) {
            sb.append("\t").append(field).append("\n");
        }
        return sb.toString();
    }
}
